from app import BASE_URL


class TrustAccountApi:

    def __init__(self, session):
        # 实名认证url
        self.approve_realname_url = BASE_URL + "/member/realname/approverealname"
        self.trust_register_url = BASE_URL + "/trust/trust/register"
        self.get_approve_info_url = BASE_URL + "/member/member/getapprove"
        self.session = session

    # 实名认证接口
    def approve_realname(self, realname, card_id):
        param = {
            "realname": realname,
            "card_id": card_id
        }
        return self.session.post(url=self.approve_realname_url, data=param, files={"files": "xxx"})

    # 获取认证信息接口
    def get_approve_info(self):
        return self.session.post(self.get_approve_info_url)

    # 开户接口
    def trust_register(self):
        return self.session.post(url=self.trust_register_url)

